✨ BCA JUL24 Batch ✨

Join Our WhatsApp Group

Anukasif Pic

5.5 - Transition From C to C++ - MCQs

Interactive MCQs Quiz

Test your knowledge with these questions

1. Which of the following is a key feature added in C++ but not available in C?

2. How is a function parameter passed by reference in C++?

3. What is the default value in C++ used for?

4. What is the syntax for calling a function by reference in C++?

5. Which of the following is a new type introduced in C++ that extends the C struct?

6. Which keyword is used in C++ to define public members of a class?

7. Which function is called automatically when an object of a class is created in C++?

8. What is the purpose of a destructor in C++?

9. In C++, what is the symbol for the destructor function?

10. Which of the following features distinguishes C++ from C?

11. What is the scope resolution operator in C++ used for?

12. Which of the following is true about function overloading in C++?

13. What is the main advantage of using a constructor in C++?

14. What is the default access specifier for class members in C++?

15. Which feature of C++ allows a function to behave differently based on the arguments passed?

16. Which C++ feature enables hiding the implementation details from the user?

17. Which of the following is an example of polymorphism in C++?

18. What is the purpose of the inline keyword in C++?

19. Which of the following represents a correct constructor declaration for a class named "Test"?

20. Which of the following is true for destructors in C++?

21. Which of the following is a feature of Object-oriented Programming (OOP)?

22. What is the term for combining data and functions that operate on the data in a single unit?

23. Which of the following is NOT a type of inheritance in C++?

24. In OOP, which of the following supports dynamic method resolution?

25. Which keyword is used to define an abstract class in C++?

26. What is the relationship between base class and derived class in inheritance?

27. Which of the following is used to prevent a class from being inherited?

28. Which operator is used to access the members of a class in C++?

29. Which type of function can have different implementations depending on the object that calls it?

30. A constructor is called when:

31. Which of the following statements about destructors is true?

32. In C++, what happens when a class inherits from another class with public access?

33. In multiple inheritance, if two base classes have a function with the same name, how can you resolve the ambiguity in the derived class?

34. Which concept allows functions to be defined with the same name but with different signatures in C++?

35. What is the purpose of a copy constructor?

36. Which of the following is a valid declaration of a pure virtual function in C++?

37. Which of the following C++ concepts provides the ability to define the same function in multiple derived classes and invoke the correct one based on the object type?

38. Which of the following is NOT an access specifier in C++?

39. In C++, the keyword this refers to:

40. Which of the following is used to release memory allocated to an object in C++?